package org.example.acquireClassInfo;

import org.example.Hello;

public class Calculator {
    private int a = 0;
    private int b = 8;

    public int add(int x,int y){
        int res = x + y;
        return res;
    }

    public int decrease(int x){
        x++;
        return x;
    }

    public void printPrivateVar(){
        Hello hello = new Hello();
        hello.say();
        System.out.println("a: "+this.a +"\n b:"+this.b);
    }

    public void callHelloAdd(){
        int x = 1;
        int y = 2;
        Hello hello = new Hello();
        int add = hello.add(x, y);
        System.out.println("the result of add is: "+add);
    }
}
